package com.mybatisplus.pojo;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

//    @TableName 映射数据库表名@TableId 对应主键类型，局部配置；@TableField 注解对应数据库字段,相同可以省略
@TableName(value = "c")
public class C {
   @TableId(value="cno",type= IdType.AUTO)//指定自增策略
    private Integer cno;
    private String cname;
    private String cteacher;

    public Integer getCno() {
        return cno;
    }

    public void setCno(Integer cno) {
        this.cno = cno;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getCteacher() {
        return cteacher;
    }

    public void setCteacher(String cteacher) {
        this.cteacher = cteacher;
    }

    @Override
    public String toString() {
        return "C{" +
                "cno=" + cno +
                ", cname='" + cname + '\'' +
                ", cteacher='" + cteacher + '\'' +
                '}';
    }
}
